home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / AIncludes / Script.a < prev    next >
Encoding:
Text File  |  1993-11-30  |  55.3 KB  |  1,602 lines  |  [TEXT/MPS ]

  1. ;    File:        Script.a
  2. ;
  3. ;    Copyright:    © 1983-1993 by Apple Computer, Inc.
  4. ;                All rights reserved.
  5. ;
  6. ;    Version:    System 7.1 for ETO #11
  7. ;    Created:    Tuesday, March 30, 1993 18:00
  8. ;
  9. ;___________________________________________________________________________
  10.  
  11.     IF &TYPE('__INCLUDINGSCRIPT__') = 'UNDEFINED' THEN
  12. __INCLUDINGSCRIPT__    SET    1
  13.  
  14. ; -----------------------------------------------------------------------------
  15.  
  16. ; Script System constants.
  17.  
  18. smSystemScript    EQU            -1                        ; designates system script                <23>
  19. smCurrentScript    EQU            -2                        ; designates current font script        <27><33>
  20. smAllScripts    EQU            -3                        ; designates any script                    <39>
  21.  
  22. smRoman           EQU         0                         ; Roman
  23. smJapanese        EQU         1                         ; Japanese
  24. smTradChinese     EQU         2                         ; Traditional Chinese                    <14>
  25. smKorean          EQU         3                         ; Korean
  26. smArabic          EQU         4                         ; Arabic
  27. smHebrew          EQU         5                         ; Hebrew
  28. smGreek           EQU         6                         ; Greek
  29. smCyrillic        EQU            7                        ; Cyrillic                                <3>
  30. smRSymbol         EQU         8                         ; Right-left symbols
  31. smDevanagari      EQU         9                         ; Devanagari
  32. smGurmukhi        EQU         10                        ; Gurmukhi
  33. smGujarati        EQU         11                        ; Gujarati
  34. smOriya           EQU         12                        ; Oriya
  35. smBengali         EQU         13                        ; Bengali
  36. smTamil           EQU         14                        ; Tamil
  37. smTelugu          EQU         15                        ; Telugu
  38. smKannada         EQU         16                        ; Kannada/Kanarese
  39. smMalayalam       EQU         17                        ; Malayalam
  40. smSinhalese       EQU         18                        ; Sinhalese
  41. smBurmese         EQU         19                        ; Burmese
  42. smKhmer           EQU         20                        ; Khmer/Cambodian
  43. smThai            EQU         21                        ; Thai
  44. smLaotian         EQU         22                        ; Laotian
  45. smGeorgian        EQU         23                        ; Georgian
  46. smArmenian        EQU         24                        ; Armenian
  47. smSimpChinese   EQU         25                        ; Simplified Chinese                    <14>
  48. smTibetan         EQU         26                        ; Tibetan
  49. smMongolian       EQU         27                        ; Mongolian
  50. smGeez            EQU            28                        ; Geez/Ethiopic                            <1.6>
  51. smEthiopic        EQU            28                        ; Synonym for smGeez                    <20>
  52. smEastEurRoman    EQU         29                        ; Extended Roman for Slavic & Baltic langs    <21>
  53. smVietnamese      EQU         30                        ; Extended Roman for Vietnamese
  54. smExtArabic        EQU            31                        ; Extended Arabic for Sindhi, etc.        <21>
  55. smUninterp        EQU         32                        ; uninterpreted symbols, e.g. palette symbols
  56.  
  57. ; Obsolete names for script systems (kept for backward compatibility).
  58.  
  59. smChinese         EQU         2                         ; (use smTradChinese or smSimpChinese).    <14>
  60. smRussian        EQU            7                        ; (old name for smCyrillic).
  61. ;smMaldivian       EQU         25                        ; (no more smMaldivian!)                <14>
  62. smAmharic        EQU            28                        ; (old name for smGeez)
  63. smSlavic          EQU         29                        ; (old name for smEastEurRoman)
  64. smSindhi          EQU         31                        ; (old name for smExtArabic)            <21>
  65.  
  66. ; Language codes - moved to LanguageEqu.a                                                    <21>
  67.  
  68. ; Calendar Codes
  69.  
  70. calGregorian      EQU         0
  71. calArabicCivil    EQU         1
  72. calArabicLunar    EQU         2
  73. calJapanese       EQU         3
  74. calJewish         EQU         4
  75. calCoptic         EQU         5
  76. calPersian        EQU            6                        ;                                            <19> 
  77.  
  78. ; Integer Format Codes
  79.  
  80. intWestern        EQU         0
  81. intArabic         EQU         1
  82. intRoman          EQU         2
  83. intJapanese       EQU         3
  84. intEuropean       EQU         4
  85. intOutputMask     EQU         $8000
  86.  
  87. ; CharByte byte types.
  88.  
  89. smSingleByte      EQU         0
  90. smFirstByte       EQU         -1
  91. smLastByte        EQU         1
  92. smMiddleByte      EQU         2
  93.  
  94. ; CharType field masks
  95.  
  96. smcTypeMask            EQU        $000F
  97. smcReserved            EQU        $00F0
  98. smcClassMask        EQU        $0F00
  99. smcOrientationMask     EQU        $1000                    ; two-byte script glyph orientation            <27><33>
  100. smcRightMask        EQU        $2000
  101. smcUpperMask        EQU        $4000
  102. smcDoubleMask        EQU        $8000
  103.  
  104. ; Basic CharType character types.
  105.  
  106. smCharPunct       EQU         $0000
  107. smCharAscii       EQU         $0001
  108. smCharEuro        EQU         $0007
  109. smCharExtAscii    EQU         $0007                    ; More correct synonym for smCharEuro        <20>
  110.  
  111. ; Additional CharType character types for script systems.
  112.  
  113. smCharKatakana         EQU     $0002                     ; Japanese Katakana                            <32>
  114. smCharHiragana         EQU     $0003                     ; Japanese Hiragana                            <32>
  115. smCharIdeographic    EQU     $0004                     ; Hanzi, Kanji, Hanja                        <32>
  116. smCharTwoByteGreek    EQU     $0005                     ; 2-byte Greek in Far East systems            <32>
  117. smCharTwoByteRussian EQU     $0006                     ; 2-byte Cyrillic in Far East systems        <32>
  118. smCharBidirect        EQU        $0008                    ; Arabic, Hebrew                            <20>
  119. smCharContextualLR    EQU        $0009                    ; Contextual left-right: Thai, Indic scripts    <48>
  120. smCharNonContextualLR EQU    $000A                    ; Non-contextual left-right: Cyrillic, Greek    <48>
  121. smCharHangul        EQU     $000C                     ; Korean Hangul                                <20><32>
  122. smCharJamo            EQU     $000D                     ; Korean Jamo                                <35>
  123. smCharBopomofo        EQU        $000E                    ; Chinese Bopomofo                            <51>
  124.  
  125. ; old names for some of above, for backward compatibility
  126. smCharFISKana         EQU     $0002                     ; Katakana
  127. smCharFISGana         EQU     $0003                     ; Hiragana
  128. smCharFISIdeo         EQU     $0004                     ; Hanzi, Kanji, Hanja
  129. smCharFISGreek        EQU     $0005                     ; 2-byte Greek in Far East systems
  130. smCharFISRussian    EQU     $0006                     ; 2-byte Cyrillic in Far East systems
  131.  
  132. ; CharType punctuation sub-types.
  133.  
  134. smPunctNormal     EQU         $0000
  135. smPunctNumber     EQU         $0100
  136. smPunctSymbol     EQU         $0200
  137. smPunctBlank      EQU         $0300                     ; NBSP is PunctNormal
  138.  
  139. ; CharType punctuation sub-types for two-byte systems                                            <27>
  140.  
  141. smPunctRepeat     EQU         $0400                     ; repeat marker                                <27><32><33>
  142. smPunctGraphic     EQU         $0500                     ; line graphics                                <27><32>
  143.  
  144. ; CharType Katakana and Hiragana sub-types for two-byte systems                                    <27>
  145.  
  146. smKanaSmall        EQU         $0100                     ; small kana character                        <27>
  147. smKanaHardOK    EQU         $0200                     ; can have dakuten                            <27>
  148. smKanaSoftOK    EQU         $0300                     ; can have dakuten or han-dakuten            <27>
  149.  
  150. ; CharType Ideographic sub-types for two-byte systems
  151.  
  152. smIdeographicLevel1    EQU     $0000                     ; level 1 char                                <32>
  153. smIdeographicLevel2    EQU     $0100                     ; level 2 char                                <32>
  154. smIdeographicUser    EQU     $0200                     ; user char                                    <32>
  155. ; old names for some of above, for backward compatibility
  156. smFISClassLvl1    EQU         $0000                     ; level 1 char                                <5><26>
  157. smFISClassLvl2    EQU         $0100                     ; level 2 char                                <5><26>
  158. smFISClassUser    EQU         $0200                     ; user char                                    <5><26>
  159.  
  160. ; CharType Jamo sub-types for Korean systems                                                    <35>
  161.  
  162. smJamoJaeum        EQU         $0000                     ; simple consonant char                        <35>
  163. smJamoBogJaeum    EQU         $0100                     ; complex consonant char                    <35>
  164. smJamoMoeum        EQU         $0200                     ; simple vowel char                            <35>
  165. smJamoBogMoeum    EQU         $0300                     ; complex consonant char                    <35>
  166.  
  167. ; CharType glyph orientation for two-byte systems                                                <27>
  168.  
  169. smCharHorizontal    EQU        $0000                    ; horizontal character form, or for both    <27>
  170. smCharVertical        EQU        $1000                    ; vertical character form                    <27>
  171.  
  172. ; CharType directions
  173.  
  174. smCharLeft        EQU         $0000
  175. smCharRight       EQU         $2000
  176.  
  177. ; CharType case modifers.
  178.  
  179. smCharLower       EQU         $0000
  180. smCharUpper       EQU         $4000
  181.  
  182. ; CharType character size modifiers (1 or multiple bytes).
  183.  
  184. smChar1byte       EQU         $0000
  185. smChar2byte       EQU         $8000
  186.  
  187. ; Char2Pixel directions.
  188.  
  189. smLeftCaret       EQU         0                         ; Place caret for left block.
  190. smRightCaret      EQU         -1                        ; Place caret for right block.
  191. smHilite          EQU         1                         ; Direction is TESysJust.
  192.  
  193. ; Transliterate target types for Roman.
  194.  
  195. smTransAscii      EQU         0                         ; convert to ASCII
  196. smTransNative     EQU         1                         ; convert to font script                <33>
  197. smTransCase       EQU         $FE                       ; convert case for all text
  198. smTransSystem     EQU         $FF                       ; convert to system script
  199.  
  200. ; Transliterate target types for two-byte scripts                                            <35>
  201.  
  202. smTransAscii1     EQU         2                         ; 1-byte Roman
  203. smTransAscii2     EQU         3                         ; 2-byte Roman
  204. smTransKana1      EQU         4                         ; 1-byte Japanese Katakana
  205. smTransKana2      EQU         5                         ; 2-byte Japanese Katakana
  206. ; (no 1-byte hiragana)
  207. smTransGana2      EQU         7                         ; 2-byte Japanese Hiragana
  208. smTransHangul2        EQU     8                         ; 2-byte Korean Hangul                    <35>
  209. smTransJamo2        EQU     9                         ; 2-byte Korean Jamo                    <35>
  210. smTransBopomofo2    EQU     10                         ; 2-byte Chinese Bopomofo                <35>
  211.  
  212. ; Transliterate target modifiers.
  213.  
  214. smTransLower      EQU         $4000                    ; target becomes lowercase                <33>
  215. smTransUpper      EQU         $8000                    ; target becomes uppercase                <33>
  216.  
  217. ; Transliterate resource format numbers 
  218.  
  219. smTransRuleBaseFormat    EQU        1                    ; Rule based trsl resource format */
  220. smTransHangulFormat        EQU        2                    ; Table based Hangul trsl resource format*/
  221.  
  222. ; Transliterate property flags 
  223.  
  224. smTransPreDoubleByting    EQU        1                    ; Convert all text to double byte before transliteration*/
  225. smTransPreLowerCasing    EQU        2                    ; Convert all text to lower case before transliteration*/
  226.   
  227. ; Transliterate source mask - general.
  228.  
  229. smMaskAll         EQU         $FFFFFFFF                 ; Convert all text
  230.  
  231. ; Transliterate source masks for Roman.
  232.  
  233. smMaskAscii       EQU         $00000001                 ; 2^smTransAscii
  234. smMaskNative      EQU         $00000002                 ; 2^smTransNative
  235.  
  236. ; Transliterate source masks for two-byte scripts.                                            <35>
  237.  
  238. smMaskAscii1      EQU         $00000004                 ; 2^smTransAscii1
  239. smMaskAscii2      EQU         $00000008                 ; 2^smTransAscii2
  240. smMaskKana1       EQU         $00000010                 ; 2^smTransKana1
  241. smMaskKana2       EQU         $00000020                 ; 2^smTransKana2
  242. smMaskGana2       EQU         $00000080                 ; 2^smTransGana2
  243. smMaskHangul2    EQU         $00000100                 ; 2^smTransHangul2                        <35>
  244. smMaskJamo2        EQU         $00000200                 ; 2^smTransJamo2                        <35>
  245. smMaskBopomofo2    EQU         $00000400                 ; 2^smTransBopomofo2                    <35>
  246.  
  247. ; Result values from GetEnvirons, SetEnvirons, GetScript and SetScript calls.
  248.  
  249. smNotInstalled    EQU         0                         ; routine not available in script
  250. smBadVerb         EQU         -1                        ; Bad verb passed to a routine.
  251. smBadScript       EQU         -2                        ; Bad script code passed to a routine.
  252.  
  253. ; Values for script redraw flag                                                                    <23>
  254.  
  255. smRedrawChar    EQU            0                        ; redraw character only
  256. smRedrawWord    EQU            1                        ; redraw entire word (2-byte systems)
  257. smRedrawLine    EQU            -1                        ; redraw entire line (bidirectional systems)
  258.  
  259. ; Result values from StyledLineBreak
  260.  
  261. smBreakWord       EQU         0                         ; could break at word boundary
  262. smBreakChar       EQU         1                         ; had to break at char boundary
  263. smBreakOverflow   EQU         2                         ; text too short, width subtracted
  264.  
  265. ; -----------------------------------------------------------------------------
  266. ; GetEnvirons and SetEnvirons verbs.
  267. ; -----------------------------------------------------------------------------
  268.  
  269. smVersion         EQU         0                         ; Script Manager version number.            <33>
  270. smMunged          EQU         2                         ; Globals change count.
  271. smEnabled         EQU         4                         ; Count of enabled scripts, incl Roman.        <33>
  272. smBidirect        EQU         6                         ; At least one bidirectional script.        <33>
  273. smFontForce       EQU         8                         ; Force font flag.
  274. smIntlForce       EQU         10                        ; Force intl flag.
  275. smForced          EQU         12                        ; Script was forced to system script.        <33>
  276. smDefault         EQU         14                        ; Script was defaulted to Roman script.        <33>
  277. smPrint           EQU         16                        ; Printer action routine.
  278. smSysScript       EQU         18                        ; System script.
  279. smLastScript      EQU         20                        ; Last keyboard script.
  280. smKeyScript       EQU         22                        ; Keyboard script.
  281. smSysRef          EQU         24                        ; System folder refNum.
  282. smKeyCache        EQU         26                        ; Obsolete                                    <33>
  283. smKeySwap         EQU         28                        ; Swapping table handle.                    <33>
  284. smGenFlags        EQU         30                        ; general flags long
  285. smOverride        EQU         32                        ; script override flags
  286. smCharPortion     EQU         34                        ; Ch vs SpExtra proportion
  287. ; New for System 7.0:    <2.4>
  288. smDoubleByte    EQU            36                        ; Flag for double-byte script installed        <2.4>
  289. smKCHRCache        EQU            38                        ; Returns pointer to KCHR cache                <2.6>
  290. smRegionCode    EQU            40                        ; Returns current region code (verXxx)        <3>
  291. smKeyDisableState EQU        42                        ; Returns current keyboard disable state    <44>
  292.  
  293. ; -----------------------------------------------------------------------------
  294. ; GetScript and SetScript verbs.
  295. ; Note: verbs private to script systems are negative, while
  296. ; those general across script systems are non-negative
  297. ; -----------------------------------------------------------------------------
  298.  
  299. smScriptVersion    EQU         0                         ; Script software version.
  300. smScriptMunged    EQU         2                         ; Script entry changed count.
  301. smScriptEnabled    EQU         4                         ; Script enabled flag.
  302. smScriptRight     EQU         6                         ; Right to left flag.
  303. smScriptJust      EQU         8                         ; Justification flag.
  304. smScriptRedraw    EQU         10                        ; Word redraw flag.
  305. smScriptSysFond    EQU         12                        ; Preferred system font.
  306. smScriptAppFond    EQU         14                        ; Preferred Application font.
  307. smScriptBundle    EQU         16                        ; Beginning of itlb verbs.
  308. smScriptNumber    EQU         16                        ; Script itl0 id.
  309. smScriptDate      EQU         18                        ; Script itl1 id.
  310. smScriptSort      EQU         20                        ; Script itl2 id.
  311. smScriptFlags     EQU         22                        ; Script flags
  312. smScriptToken     EQU         24                        ; Script itl4 id.
  313. smScriptEncoding EQU         26                        ; id of optional itl5, if present.            <22>
  314. smScriptLang      EQU         28                        ; Current language for script
  315. smScriptNumDate    EQU         30                        ; Script Number/Date formats
  316. smScriptKeys      EQU         32                        ; Script KCHR id.
  317. smScriptIcon      EQU         34                        ; ID # of SICN or kcs#/kcs4/kcs8 suite.
  318. smScriptPrint     EQU         36                        ; Script printer action routine.
  319. smScriptTrap      EQU         38                        ; Trap entry pointer.
  320. smScriptCreator    EQU         40                        ; Script file creator.
  321. smScriptFile      EQU         42                        ; Script file name.
  322. smScriptName      EQU         44                        ; Script name.
  323. ; There is a hole here for old Kanji private verbs 46-76
  324.  
  325. ; New for System 7.0:    <1.9>
  326. smScriptMonoFondSize EQU      78                        ; default monospace FOND (hi) & size (lo)
  327. smScriptPrefFondSize EQU      80                        ; preferred FOND (hi) & size (lo)
  328. smScriptSmallFondSize EQU     82                        ; default small FOND (hi) & size (lo)
  329. smScriptSysFondSize EQU       84                        ; default system FOND (hi) & size (lo)
  330. smScriptAppFondSize EQU       86                        ; default application FOND (hi) & size (lo)    <9>
  331. smScriptHelpFondSize EQU       88                        ; default Help Mgr FOND (hi) & size (lo)    <9>
  332. smScriptValidStyles EQU       90                        ; mask of valid styles for script            <18>
  333. smScriptAliasStyle EQU       92                        ; style (set) to use for aliases            <18>
  334.  
  335. ; -----------------------------------------------------------------------------
  336. ; Negative verbs for KeyScript                                                                <13><23>
  337. ; -----------------------------------------------------------------------------
  338.  
  339. smKeyNextScript            EQU        -1            ; Switch to next available script
  340. smKeySysScript            EQU        -2            ; Switch to the system script
  341. smKeySwapScript            EQU        -3            ; Switch to previously-used script                    <19>
  342.  
  343. ; New for System 7.0
  344. smKeyNextKybd            EQU        -4            ; Switch to next keyboard in current keyscript
  345. smKeySwapKybd            EQU        -5            ; Switch to previously-used keyboard in current keyscript
  346.                                             ;    (smKeySwapKybd is not implemented in System 7.0)
  347. smKeyDisableKybds        EQU        -6            ; Disable keyboards not in system or Roman script    <23>
  348. smKeyEnableKybds        EQU        -7            ; Re-enable keyboards for all enabled scripts        <23>
  349.  
  350. ; Not currently implemented in System, may be implemented by script systems                        <19>
  351. ; (Renumbered smKeyNextInputMethod, smKeySwapInputMethod)                                        <23>
  352. smKeyToggleInline        EQU        -8            ; Toggle inline input for current keyscript
  353. smKeyToggleDirection    EQU        -9            ; Toggle default line direction (TESysJust)
  354. smKeyNextInputMethod    EQU        -10            ; Switch to next input method in current keyscript    <23>
  355. smKeySwapInputMethod    EQU        -11            ; Switch to last-used input method in cur keyscript    <23>
  356.  
  357. smKeyDisableKybdSwitch    EQU        -12            ; Disable switching from the current keyboard        <24>
  358.  
  359. smKeySetDirLeftRight    EQU        -15            ; Set default line dir to left-right, align left    <42>
  360. smKeySetDirRightLeft    EQU        -16            ; Set default line dir to right-left, align right    <42>
  361. smKeyRoman                EQU        -17            ; Set keyscript to Roman. Does nothing if Roman-only    <46>
  362.                                             ;    system, unlike KeyScript(smRoman) which forces        <46>
  363.                                             ;    an update to current default keyboard for Roman)    <46>
  364. ; -----------------------------------------------------------------------------
  365. ; Bits in the smScriptFlags word (bits above 8 are non-static)
  366. ; -----------------------------------------------------------------------------
  367.  
  368. smsfIntellCP      EQU         0                         ; script has intelligent cut & paste
  369. smsfSingByte      EQU         1                         ; script has only single bytes
  370. smsfNatCase       EQU         2                         ; native chars have upper & lower case
  371. smsfContext       EQU         3                         ; script is contextual                        <33>
  372. smsfNoForceFont    EQU         4                         ; script will not force characters
  373. smsfB0Digits      EQU         5                         ; script has alternate digits at B0-B9
  374. smsfAutoInit    EQU            6                        ; auto initialize the script                <8>
  375. smsfUnivExt        EQU            7                        ; script is handled by universal extension    <42>
  376. smsfSynchUnstyledTE    EQU        8                        ; script synchronizes for unstyled TE        <52>
  377. smsfForms         EQU         13                        ; uses contextual forms for letters
  378. smsfLigatures     EQU         14                        ; uses contextual ligatures
  379. smsfReverse       EQU         15                        ; reverses native text, right-left
  380.  
  381. ; -----------------------------------------------------------------------------
  382. ; Bits in the smGenFlags long. First (high-order) byte is set from itlc flags byte.
  383. ; -----------------------------------------------------------------------------
  384. smfShowIcon        EQU            31                        ; show icon even if only one script    
  385. smfDualCaret    EQU            30                        ; use dual caret for mixed direction text
  386. smfNameTagEnab    EQU            29                        ; reserved for internal use                    <16>
  387. smfUseAssocFontInfo    EQU        28                        ; Use the associated font info for FontMetrics calls <45>
  388.  
  389. ; -----------------------------------------------------------------------------
  390. ; Bits in the itlcFlags byte.
  391. ; -----------------------------------------------------------------------------
  392. itlcShowIcon    EQU            7                        ; Show icon even if only one script            <41>    
  393. itlcDualCaret    EQU            6                        ; Use dual caret for mixed direction text    <41>
  394.  
  395. ; -----------------------------------------------------------------------------
  396. ; Bits in the itlcSysFlags word.
  397. ; -----------------------------------------------------------------------------
  398. itlcSysDirection    EQU        15                        ; System direction - left to right/right to left    <41>
  399.  
  400. ; -----------------------------------------------------------------------------
  401. ; Roman script constants.
  402. ; -----------------------------------------------------------------------------
  403.  
  404. ; The following are here for backward compatibility, but should not be used.                    <19>
  405. ; This information should be obtained using GetScript.
  406. romanSysFond    EQU    $3FFF                            ; system font id number.
  407. romanAppFond    EQU    3                                ; application font id number.
  408. romanFlags        EQU    (1<<smsfIntellCP)+(1<<smsfSingByte)+(1<<smsfNatCase)    ; roman settings
  409.  
  410. ; Script Manager font equates.
  411.  
  412. smFondStart       EQU         $4000                     ; start from 16K.
  413. smFondEnd         EQU         $C000                     ; past end of range at 48K.
  414.  
  415. ; -----------------------------------------------------------------------------
  416. ; Simple script constants.
  417. ; -----------------------------------------------------------------------------
  418. smUprHalfCharSet    EQU        $80        ; first character code in upper half of Macintosh Character Set    <8>
  419.  
  420. ; -----------------------------------------------------------------------------
  421. ; Macintosh character set extensions
  422. ; -----------------------------------------------------------------------------
  423.  
  424. diaeresisUprY     EQU         $D9                       ; Ÿ
  425. fraction          EQU         $DA                       ; ⁄
  426. intlCurrency      EQU         $DB                       ; €
  427. leftSingGuillemet    EQU     $DC                       ; ‹
  428. rightSingGuillemet    EQU        $DD                       ; ›
  429. fiLigature        EQU         $DE                       ; fi
  430. flLigature        EQU         $DF                       ; fl
  431. dblDagger         EQU         $E0                       ; ‡
  432. centeredDot       EQU         $E1                       ; ·
  433. baseSingQuote     EQU         $E2                       ; ‚
  434. baseDblQuote      EQU         $E3                       ; „
  435. perThousand       EQU         $E4                       ; ‰
  436. circumflexUprA    EQU         $E5                       ; Â
  437. circumflexUprE    EQU         $E6                       ; Ê
  438. acuteUprA         EQU         $E7                       ; Á
  439. diaeresisUprE     EQU         $E8                       ; Ë
  440. graveUprE         EQU         $E9                       ; È
  441. acuteUprI         EQU         $EA                       ; Í
  442. circumflexUprI    EQU         $EB                       ; Î
  443. diaeresisUprI     EQU         $EC                       ; Ï
  444. graveUprI         EQU         $ED                       ; Ì
  445. acuteUprO         EQU         $EE                       ; Ó
  446. circumflexUprO    EQU         $EF                       ; Ô
  447. appleLogo         EQU         $F0                       ; 
  448. graveUprO         EQU         $F1                       ; Ò
  449. acuteUprU         EQU         $F2                       ; Ú
  450. circumflexUprU    EQU         $F3                       ; Û
  451. graveUprU         EQU         $F4                       ; Ù
  452. dotlessLwrI       EQU         $F5                       ; ı
  453. circumflex        EQU         $F6                       ; ˆ
  454. tilde             EQU         $F7                       ; ˜
  455. macron            EQU         $F8                       ; ¯
  456. breveMark         EQU         $F9                       ; ˘                                        <34>
  457. overDot           EQU         $FA                       ; ˙
  458. ringMark          EQU         $FB                       ; ˚                                        <34>
  459. cedilla           EQU         $FC                       ; ¸
  460. doubleAcute       EQU         $FD                       ; ˝
  461. ogonek            EQU         $FE                       ; ˛
  462. hachek            EQU         $FF                       ; (don't type it here - breaks MPW tools!)
  463.  
  464. ; -----------------------------------------------------------------------------
  465. ; Other new constants for 7.0                                                                <2.7>
  466. ; -----------------------------------------------------------------------------
  467.  
  468. ; Constants for truncWhere argument in TruncString and TruncText                            <2.7>
  469.  
  470. smTruncEnd        EQU         0                         ; Truncate at end
  471. smTruncMiddle     EQU         $4000                     ; Truncate in middle
  472.  
  473. ; Constants for TruncString and TruncText results                                            <13>
  474.  
  475. smNotTruncated     EQU         0                        ; No truncation was necessary
  476. smTruncated        EQU         1                         ; Truncation performed
  477. smTruncErr        EQU            -1                        ; General error
  478.  
  479. ; Constants for styleRunPosition argument in NPortionText, NDrawJust, NMeasureJust,            <2>
  480. ; NChar2Pixel, and NPixel2Char.
  481.  
  482. smOnlyStyleRun    EQU         0                         ; This is the only style run on the line.
  483. smLeftStyleRun    EQU         1                         ; This is leftmost of multiple style runs on the line.
  484. smRightStyleRun   EQU         2                         ; This is rightmost of multiple style runs on the line.
  485. smMiddleStyleRun  EQU         3                         ; There are multiple style runs on the line and this…
  486.                                                     ; …is neither the leftmost nor the rightmost.
  487.  
  488. ; -----------------------------------------------------------------------------
  489. ; Record declarations for itlc, itlb, itl2, itl4
  490. ; -----------------------------------------------------------------------------
  491. ; Record declaration for international configuration resource (type itlc).
  492.  
  493. ItlcRecord        record      0
  494. itlcSystem        ds.w        1                         ; default system script.
  495. itlcReserved      ds.w        1                         ; reserved
  496. itlcFontForce     ds.b        1                         ; default font force flag.
  497. itlcIntlForce     ds.b        1                         ; default intl force flag.
  498. itlcOldKybd       ds.b        1                         ; MacPlus intl keybd flag                <33>
  499. itlcFlags         ds.b        1                         ; general flags
  500. itlcIconOffset    ds.w        1                        ; keyboard icon offset (not in 7.0)        <1.3><33>
  501. itlcIconSide    ds.b        1                        ; keybd icon side (R=0,L=$FF) (not 7.0) <1.3><33>
  502. itlcIconRsvd    ds.b        1                        ; rsvd for other icon info                <1.3><33>
  503. itlcRegionCode    ds.w        1                        ; preferred verXxx code                    <4>
  504. itlcSysFlags    ds.w        1                        ; flags for setting system globals        <40>
  505. itlcReserved4    ds.b        32                        ; for future use                        <4><5><40>
  506. itlcSize          equ         *                         ; size of script itlc.
  507.                   endr
  508.  
  509. ; Record declaration for international bundle resource (type itlb).
  510.  
  511. ItlbRecord        record      0
  512. itlbNumber        ds.w        1                         ; itl0 ID number.
  513. itlbDate          ds.w        1                         ; itl1 ID number.
  514. itlbSort          ds.w        1                         ; itl2 ID number.
  515. itlbFlags         ds.w        1                         ; Script Flags.
  516. itlbToken         ds.w        1                         ; itl4 ID number.
  517. itlbEncoding     ds.w        1                         ; itl5 ID # (optional; char encoding).    <22>
  518. itlbLang          ds.w        1                         ; current language for script
  519. itlbNumRep        ds.b        1                         ; number representation code
  520. itlbDateRep       ds.b        1                         ; date representation code
  521. itlbKeys          ds.w        1                         ; KCHR id number.
  522. itlbIcon          ds.w        1                         ; ID # of SICN or kcs#/kcs4/kcs8 suite.
  523. itlbSize          equ         *                         ; size of bundle.
  524.                   endr
  525.  
  526. ; Extended itlb to support auto initialization of scripts <8>
  527. ItlbExtRecord    record    0
  528. base            ds        ItlbRecord        ; un-extended itlbRecord
  529. itlbLocalSize    ds.l    1                ; size of script's local record
  530. itlbMonoFond    ds.w    1                ; default monospace FOND ID
  531. itlbMonoSize    ds.w    1                ; default monospace font size
  532. itlbPrefFond    ds.w    1                ; preferred FOND ID
  533. itlbPrefSize    ds.w    1                ; preferred font size
  534. itlbSmallFond    ds.w    1                ; default small FOND ID
  535. itlbSmallSize    ds.w    1                ; default small font size
  536. itlbSysFond        ds.w    1                ; default system FOND ID
  537. itlbSysSize        ds.w    1                ; default system font size
  538. itlbAppFond        ds.w    1                ; default application FOND ID
  539. itlbAppSize        ds.w    1                ; default application font size
  540. itlbHelpFond    ds.w    1                ; default Help Mgr FOND ID                            <9>
  541. itlbHelpSize    ds.w    1                ; default Help Mgr font size                        <9>
  542. itlbValidStyles    ds.b    1                ; mask of valid styles for script                    <18>
  543. itlbAliasStyle    ds.b    1                ; style (set) to mark aliases                        <18>
  544. itlbExtSize        equ    *                    ; size of ItlbExtRecord
  545.                 endr
  546.                 
  547. ; itl2 routine vector offsets.
  548.  
  549. initHook          EQU         0
  550. fetchHook         EQU         2
  551. vernierHook       EQU         4
  552. projectHook       EQU         6
  553. rsvdHook          EQU         8
  554. exitHook          EQU         10
  555.  
  556. ; Note that the value of itl2FlagsOffset is equal
  557. ; to the value of rsvdHook. In the old itl2
  558. ; format the value at this location was an 
  559. ; unused routine offset. In the new itl2
  560. ; format, the value at this location is a flag
  561. ; ($ffff) indicating the new format that includes
  562. ; the offsets to the tables for LwrString and
  563. ; tables for the Roman versions of the CharType,
  564. ; Transliterate and FindWord.
  565.  
  566. itl2FlagsOffset   EQU         8
  567. ; itl2 table offsets
  568.  
  569. typeListOffset      EQU         12
  570. classArrayOffset  EQU         14
  571. upperListOffset   EQU         16
  572. lowerListOffset   EQU         18
  573. upperNoMarkListOffset EQU     20
  574. wordTableOffset   EQU         22
  575. wrapTableOffset   EQU         24
  576. noMarkListOffset  EQU         26
  577. itl2VersionOffset EQU         28
  578. itl2FormatOffset  EQU        30        ;                                    <28>
  579.  
  580. ; New for System 7.0:<2.5>
  581. ; itl2 table/code lengths.
  582.  
  583. wordTableLen            EQU    54        ;                                    <2.5>
  584. wrapTableLen            EQU    56        ;                                    <2.5>
  585. findScriptTableOffset    EQU    60        ;                                     <8>
  586. findScriptTableLen        EQU    62        ;                                     <8>
  587.  
  588. ; New for System 7.0:
  589. ; itl2FormatOffset definitions
  590. hdrExtensionsExist    EQU        1        ;                                    <28>
  591.  
  592. ; String data structure for itl2 stack frames.
  593.  
  594. IUStrData         record      0
  595. curChar           ds.w        1                         ; current character.
  596. mapChar           ds.w        1                         ; projected character.
  597. decChar           ds.w        1                         ; decision char for weak equality.
  598. bufChar           ds.b        1                         ; buffer for expansion.
  599. justAfter         ds.b        1                         ; boolean for AE vs ligature-AE.
  600. ignChar           ds.b        1                         ; flag: ignore char.
  601. noFetch           ds.b        1                         ; flag: no fetch of next.
  602. strCnt            ds.w        1                         ; length word.
  603. strPtr            ds.l        1                         ; current ptr to string.
  604.                   endr
  605.  
  606. ; Stack frame for itl2 sorting routines.
  607.  
  608. IUSortFrame       record      {oldA6},decrement
  609. result            ds.w        1
  610. aStrText          ds.l        1
  611. bStrText          ds.l        1
  612. aStrLen           ds.w        1
  613. bStrLen           ds.w        1
  614. return            ds.l        1
  615. oldA6             ds.l        1
  616. aInfo             ds          IUStrData
  617. bInfo             ds          IUStrData
  618. wantMag         ds.b        1                        ; 0 to use primary differences only; else 1        <33>
  619. weakEq            ds.b        1                        ; Signals at most weak equality.
  620. msLock            ds.b        1                        ; (obsolete, not used)
  621. weakMag         ds.b        1                        ; -1 to force magnitude result (-1,0,1); else 0    <33>
  622. supStorage        ds.b        18                        ; extra storage.
  623. weakAPtr          ds.l        1                         ; sup. pointer
  624. weakBPtr          ds.l        1                         ; sup. pointer
  625. lkSize            equ         *                         ; frame size.
  626. paramBytes        equ         aStrText-return
  627.                   endr
  628.  
  629. ; New for System 7.0:
  630. ; New stack frame for itl2 sorting routines in System 7.0; adds itl2Handle field.                    <5>
  631.  
  632. IUNSortFrame record    {oldA6},decrement
  633. result        ds.w    1
  634. aStrText    ds.l    1
  635. bStrText    ds.l    1
  636. aStrLen        ds.w    1
  637. bStrLen        ds.w    1
  638. return        ds.l    1
  639. oldA6        ds.l    1
  640. aInfo        ds    IUStrData
  641. bInfo        ds    IUStrData
  642. wantMag     ds.b    1            ; 0 to use primary differences only; else 1                            <33>
  643. weakEq        ds.b    1            ; Signals at most weak equality.
  644. msLock        ds.b    1            ; (obsolete, not used)
  645. weakMag     ds.b    1            ; -1 to force magnitude result (-1,0,1); else 0                        <33>
  646. supStorage    ds.b    18            ; extra storage.
  647. weakAPtr    ds.l    1            ; sup. pointer
  648. weakBPtr    ds.l    1            ; sup. pointer
  649. itl2Handle    ds.l    1            ; itl2 handle, if supplied                                            <2.3>
  650. lkSize        equ    *                ; frame size.
  651. paramBytes    equ    aStrText-return
  652.             endr
  653.  
  654. Itl4Rec           record      0,increment    ;                                                (added comments <33>)
  655. flags             ds.w        1            ; reserved
  656. resourceType      ds.l        1            ; contains 'itl4'
  657. resourceNum       ds.w        1            ; resource ID
  658. version           ds.w        1            ; version number
  659. resHeader1        ds.l        1            ; reserved
  660. resHeader2        ds.l        1            ; reserved
  661. numTables         ds.w        1            ; number of tables, one-based
  662.                                 ; the following offsets are from beginning of resource
  663. mapOffset         ds.l        1            ; offset to table that maps byte to token
  664. strOffset         ds.l        1            ; offset to routine that copies canonical string
  665. fetchOffset       ds.l        1            ; offset to routine that gets next byte of character
  666. unTokenOffset     ds.l        1            ; offset to table that maps token to canonical string
  667. defPartsOffset    ds.l        1            ; offset to default number parts table
  668. resOffset6        ds.l        1            ; reserved
  669. resOffset7        ds.l        1            ; reserved
  670. resOffset8        ds.l        1            ; reserved
  671. itl4HeaderSize    equ         *
  672. ; the rest is data pointed to by offsets.
  673.                   endr
  674.  
  675. ; New for System 7.0:    <5>
  676.  
  677. NItl4Rec        record    0,increment    ;                                        (added comments <33>)
  678. flags            ds.w    1            ; reserved
  679. resourceType    ds.l    1            ; contains 'itl4'
  680. resourceNum        ds.w    1            ; resource ID
  681. version            ds.w    1            ; version number
  682. format            ds.w    1            ; format code                                <29>
  683. resHeader        ds.w    1            ; reserved                                    <29>
  684. resHeader2        ds.l    1            ; reserved
  685. numTables        ds.w    1            ; number of tables, one-based
  686.                             ; the following offsets are from beginning of resource
  687. mapOffset        ds.l    1            ; offset to table that maps byte to token
  688. strOffset        ds.l    1            ; offset to routine that copies canonical string
  689. fetchOffset        ds.l    1            ; offset to routine that gets next byte of character
  690. unTokenOffset    ds.l    1            ; offset to table that maps token to canonical string
  691. defPartsOffset    ds.l    1            ; offset to default number parts table
  692. whtSpListOffset    ds.l    1            ; offset to white space code list            <2.3><15>
  693. resOffset7        ds.l    1            ; reserved
  694. resOffset8        ds.l    1            ; reserved
  695. resLength1        ds.w    1            ; reserved                                    <2.5>
  696. resLength2        ds.w    1            ; reserved                                    <2.5>
  697. resLength3        ds.w    1            ; reserved                                    <2.5>
  698. unTokenLength    ds.w    1            ; length of untoken table                    <2.5><9>
  699. defPartsLength    ds.w    1            ; length of default number parts table        <2.5><9>
  700. whtSpListLength    ds.w    1            ; length of white space code list            <2.5><9><20>
  701. resLength7        ds.w    1            ; reserved                                    <2.5>
  702. resLength8        ds.w    1            ; reserved                                    <2.5>
  703. nItl4HeaderSize    equ        *            ;                                            <22>
  704. ; the rest is data pointed to by offsets.
  705.             endr
  706.  
  707. ; -----------------------------------------------------------------------------
  708. ; Record declarations and constants for date/time/location handling
  709. ; -----------------------------------------------------------------------------
  710.  
  711. LongDateRec       record      0                         ; zero any fields not used!
  712. era               ds.w        1
  713. year              ds.w        1
  714. month             ds.w        1
  715. day               ds.w        1
  716. hour              ds.w        1
  717. minute            ds.w        1
  718. second            ds.w        1
  719. dayOfWeek         ds.w        1
  720. dayOfYear         ds.w        1
  721. weekOfYear        ds.w        1
  722. pm                ds.w        1
  723. ldReserved        ds.w        3
  724. LongDateRecSize   equ         *
  725.                   endR
  726.  
  727. LongDateTime      record      0                         ; record for comp type
  728. highLong          ds.l        1
  729. lowLong           ds.l        1
  730.                   endR
  731.  
  732. ; date equates constants
  733.  
  734. LongDateField     record      0                         ;DateField: enum type
  735. eraField          ds.b        1
  736. yearField         ds.b        1
  737. monthField        ds.b        1
  738. dayField          ds.b        1
  739. hourField         ds.b        1
  740. minuteField       ds.b        1
  741. secondField       ds.b        1
  742. dayOfWeekField    ds.b        1
  743. dayOfYearField    ds.b        1
  744. weekOfYearField   ds.b        1
  745. pmField           ds.b        1
  746. res1Field         ds.b        1
  747. res2Field         ds.b        1
  748. res3Field         ds.b        1
  749.  
  750. maxDateField      equ         pmField                   ; currently largest used field
  751.  
  752. eraMask           equ         1<<eraField
  753. yearMask          equ         1<<yearField
  754. monthMask         equ         1<<monthField
  755. dayMask           equ         1<<dayField
  756. hourMask          equ         1<<hourField
  757. minuteMask        equ         1<<minuteField
  758. secondMask        equ         1<<secondField
  759. dayOfWeekMask     equ         1<<dayOfWeekField
  760. dayOfYearMask     equ         1<<dayOfYearField
  761. weekOfYearMask    equ         1<<weekOfYearField
  762. pmMask            equ         1<<pmField
  763.  
  764. dateStdMask       equ         eraMask++yearMask++monthMask++dayMask++hourMask++minuteMask++secondMask
  765.                   endR
  766.  
  767. smallDateBit      EQU         31                        ; Restrict valid date/time to range of Time global
  768. togChar12HourBit  EQU         30                        ; If toggling hour by char, accept hours 1..12 only
  769. togCharZCycleBit  EQU         29                        ; Modifier for togChar12HourBit: accept hours 0..11 only
  770. togDelta12HourBit EQU         28                        ; If toggling hour up/down, restrict to 12-hour range (am/pm)
  771. genCdevRangeBit   EQU         27                        ; Restrict date/time to range used by genl CDEV
  772. validDateFields   EQU         -1
  773.  
  774.  
  775. TogglePB          record      0
  776. togFlags         ds.l        1                         ; longint; caller normally sets low word to dateStdMask = $7F
  777. amChars          ds.l        1                         ; ResType; from 'itl0', but uppercased                <33>
  778. pmChars          ds.l        1                         ; ResType; from 'itl0', but uppercased                <33>
  779. reserved         ds.l        4                         ; array [0..3] of Longint
  780.                   endR
  781.  
  782. ToggleResults     record      0
  783. toggleUndefined   ds.b        1
  784. toggleOk          ds.b        1
  785. toggleBadField    ds.b        1
  786. toggleBadDelta    ds.b        1
  787. toggleBadChar     ds.b        1
  788. toggleUnknown     ds.b        1
  789. toggleBadNum      ds.b        1                         ; can't use char as number
  790. toggleOutOfRange  EQU         *                         ; synonym for toggleErr3
  791. toggleErr3        ds.b        1                         ; reserved
  792. toggleErr4        ds.b        1                         ; reserved
  793. toggleErr5        ds.b        1                         ; reserved
  794.                   endR
  795.  
  796. MachineLocation   record      0
  797. latitude          ds.l        1                         ; fract
  798. longitude         ds.l        1                         ; fract
  799. dlsDelta          ds.b        1                         ; signed byte
  800. gmtDelta          ds.b        3                         ; 3 byte signed integer
  801.                   endR
  802.  
  803.  
  804. ; String2Date/String2Time status values
  805.  
  806. fatalDateTime        EQU     $8000                     ; String2Date and String2Time mask to a fatal error
  807. longDateFound        EQU     1                         ; String2Date mask to long date found
  808. leftOverChars        EQU     2                         ; String2Date & Time mask to warn of left over characters
  809. sepNotIntlSep        EQU     4                         ; String2Date & Time mask to warn of non-standard separators
  810. fieldOrderNotIntl    EQU     8                         ; String2Date & Time mask to warn of non-standard field order
  811. extraneousStrings    EQU     16                        ; String2Date & Time mask to warn of unparsable strings in text
  812. tooManySeps            EQU     32                        ; String2Date & Time mask to warn of too many separators
  813. sepNotConsistent    EQU     64                        ; String2Date & Time mask to warn of inconsistent separators
  814. tokenErr            EQU     fatalDateTime + 256       ; String2Date & Time mask for 'tokenizer err encountered'
  815. cantReadUtilities    EQU     fatalDateTime + 512       ;
  816. dateTimeNotFound    EQU     fatalDateTime + 1024      ; String2Date mask for 'date was not found'
  817. dateTimeInvalid        EQU     fatalDateTime + 2048      ; Invalid time/date e.g. 13:61PM
  818.  
  819.  
  820. DateOrders        RECORD      0,INCREMENT
  821. mdy               DS.B        1
  822. dmy               DS.B        1
  823. ymd               DS.B        1
  824. myd               DS.B        1
  825. dym               DS.B        1
  826. ydm               DS.B        1
  827.                   ENDR
  828.  
  829. ; -----------------------------------------------------------------------------
  830. ;  Constants and record declarations for tokenizer                            (added comments <33>)
  831. ; -----------------------------------------------------------------------------
  832.  
  833. tokenIntl         EQU         4             ; the itl resource number for the tokenizer
  834.  
  835. tokenEmpty        EQU         -1            ; used internally as an empty flag
  836. tokenUnknown      EQU         0            ; chars that do not match a defined token type
  837. tokenWhite        EQU         1            ; white space
  838. tokenLeftLit      EQU         2            ; literal begin
  839. tokenRightLit     EQU         3            ; literal end
  840. tokenAlpha        EQU         4            ; alphabetic
  841. tokenNumeric      EQU         5            ; numeric
  842. tokenNewLine      EQU         6            ; new line
  843. tokenLeftComment  EQU         7            ; open comment
  844. tokenRightComment EQU         8            ; close comment
  845. tokenLiteral      EQU         9            ; literal
  846. tokenEscape       EQU         10            ; character escape (e.g. '\' in "\n", "\t")
  847. tokenAltNum       EQU         11            ; alternate number (e.g. $B0-B9 in Arabic,Hebrew)
  848. tokenRealNum      EQU         12            ; real number
  849. tokenAltReal      EQU         13            ; alternate real number
  850. tokenReserve1     EQU         14            ; reserved
  851. tokenReserve2     EQU         15            ; reserved
  852. tokenLeftParen    EQU         16            ; open parenthesis
  853. tokenRightParen   EQU         17            ; close parenthesis
  854. tokenLeftBracket  EQU         18            ; open square bracket
  855. tokenRightBracket EQU         19            ; close square bracket
  856. tokenLeftCurly    EQU         20            ; open curly bracket
  857. tokenRightCurly   EQU         21            ; close curly bracket
  858. tokenLeftEnclose  EQU         22            ; open guillemet
  859. tokenRightEnclose EQU         23            ; close guillemet
  860. tokenPlus         EQU         24
  861. tokenMinus        EQU         25
  862. tokenAsterisk     EQU         26            ; times/multiply
  863. tokenDivide       EQU         27
  864. tokenPlusMinus    EQU         28            ; plus or minus symbol
  865. tokenSlash        EQU         29
  866. tokenBackSlash    EQU         30
  867. tokenLess         EQU         31            ; less than symbol
  868. tokenGreat        EQU         32            ; greater than symbol
  869. tokenEqual        EQU         33
  870. tokenLessEqual2   EQU         34            ; less than or equal, 2 characters (e.g. <=)
  871. tokenLessEqual1   EQU         35            ; less than or equal, 1 character
  872. tokenGreatEqual2  EQU         36            ; greater than or equal, 2 characters (e.g. >=)
  873. tokenGreatEqual1  EQU         37            ; greater than or equal, 1 character
  874. token2Equal       EQU         38            ; double equal (e.g. ==)
  875. tokenColonEqual   EQU         39            ; colon equal
  876. tokenNotEqual     EQU         40            ; not equal, 1 character
  877. tokenLessGreat    EQU         41            ; less/greater, Pascal not equal (e.g. <>)
  878. tokenExclamEqual  EQU         42            ; exclamation equal, C not equal (e.g. !=)
  879. tokenExclam       EQU         43            ; exclamation point
  880. tokenTilde        EQU         44            ; centered tilde                        (fix spelling <15>)
  881. tokenComma        EQU         45
  882. tokenPeriod       EQU         46
  883. tokenLeft2Quote   EQU         47            ; open double quote
  884. tokenRight2Quote  EQU         48            ; close double quote
  885. tokenLeft1Quote   EQU         49            ; open single quote
  886. tokenRight1Quote  EQU         50            ; close single quote
  887. token2Quote       EQU         51            ; double quote
  888. token1Quote       EQU         52            ; single quote
  889. tokenSemicolon    EQU         53
  890. tokenPercent      EQU         54
  891. tokenCaret        EQU         55            ;                                        (fix spelling <33>)
  892. tokenUnderline    EQU         56
  893. tokenAmpersand    EQU         57
  894. tokenAtSign       EQU         58
  895. tokenBar          EQU         59            ; vertical bar
  896. tokenQuestion     EQU         60
  897. tokenPi           EQU         61            ; lower-case pi
  898. tokenRoot         EQU         62            ; square root symbol
  899. tokenSigma        EQU         63            ; capital sigma
  900. tokenIntegral     EQU         64            ; integral sign
  901. tokenMicro        EQU         65
  902. tokenCapPi        EQU         66            ; capital pi
  903. tokenInfinity     EQU         67
  904. tokenColon        EQU         68
  905. tokenHash         EQU         69            ; e.g. #
  906. tokenDollar       EQU         70
  907. tokenNoBreakSpace EQU         71            ; non-breaking space
  908. tokenFraction     EQU         72
  909. tokenIntlCurrency EQU         73
  910. tokenLeftSingGuillemet EQU    74
  911. tokenRightSingGuillemet EQU   75        ;                                    (Fixed spelling <19>)
  912. tokenPerThousand  EQU         76
  913. tokenEllipsis    EQU         77            ;                                            <15>
  914. tokenCenterDot    EQU         78            ;                                            <15>
  915. tokenNil          EQU         127
  916.  
  917. delimPad          EQU         -2
  918.  
  919. ; obsolete, misspelled token names kept for backward compatibility            (moved here <33>)
  920.  
  921. tokenTilda        EQU         44            ; keep wrong spelling for backward compatibility <15>
  922. tokenCarat        EQU         55
  923.  
  924. TokenResults      record      0
  925. tokenOK           ds.b        1
  926. tokenOverflow     ds.b        1
  927. stringOverflow    ds.b        1
  928. badDelim          ds.b        1
  929. badEnding         ds.b        1
  930. crash             ds.b        1
  931.                   endr
  932.  
  933. TokenBlock        RECORD      0,INCR                    ;                                    (added comments <33>)
  934. source            ds.l        1                        ; pointer to stream of characters
  935. sourceLength      ds.l        1                        ; length of source stream
  936. tokenList         ds.l        1                        ; pointer to array of tokens
  937. tokenLength       ds.l        1                        ; maximum length of TokenList
  938. tokenCount        ds.l        1                        ; number tokens generated by tokenizer
  939. stringList        ds.l        1                        ; pointer to stream of identifiers
  940. stringLength      ds.l        1                        ; length of string list
  941. stringCount       ds.l        1                        ; number of bytes currently used
  942. doString          ds.b        1                        ; Boolean: make strings & put into StringList
  943. doAppend          ds.b        1                        ; Boolean: append to TokenList rather than replace
  944. doAlphanumeric    ds.b        1                        ; Boolean: identifiers may include numeric
  945. doNest            ds.b        1                        ; Boolean: do comments nest?
  946. leftDelims        ds.w        2
  947. rightDelims       ds.w        2
  948. leftComment       ds.l        2
  949. rightComment      ds.l        2
  950. escapeCode        ds.w        1                        ; escape symbol code
  951. decimalCode       ds.w        1
  952. itlResource       ds.l        1                        ; handle to itl4 resource of current script
  953. reserved          ds.l        8                         ; must be zero!
  954.                   ENDR
  955.  
  956. TokenRec          RECORD      0,INCR                    ;                                    (added comments <33>)
  957. theToken          ds.w        1                        ; TokenType
  958. position          ds.l        1                        ; Ptr into original source
  959. length            ds.l        1                        ; length of text in original source
  960. stringPosition    ds.l        1                        ; StringPtr to copy of identifier
  961. tokenRecSize      equ         *
  962.                   ENDR
  963.  
  964. UntokenTable      Record      0, INCR
  965. len               ds.w        1
  966. lastToken         ds.w        1
  967. index             ds.w        256                       ; index table; last = lastToken
  968. ;list of pascal strings here. index pointers are from front of table
  969.                   Endr
  970.  
  971. ; -----------------------------------------------------------------------------
  972. ; Record declarations and constants for formatted number handling
  973. ; -----------------------------------------------------------------------------
  974.  
  975. ; FormatClass enumeration
  976.  
  977. fPositive         EQU         0
  978. fNegative         EQU         1
  979. fZero             EQU         2
  980.  
  981. ; FormatResultType enumeration
  982.  
  983. fFormatOK         EQU         0
  984. fBestGuess        EQU         1
  985. fOutOfSynch       EQU         2
  986. fSpuriousChars    EQU         3
  987. fMissingDelimiter EQU         4
  988. fExtraDecimal     EQU         5
  989. fMissingLiteral   EQU         6
  990. fExtraExp         EQU         7
  991. fFormatOverflow   EQU         8
  992. fFormStrIsNAN     EQU         9
  993. fBadPartsTable    EQU         10
  994. fExtraPercent     EQU         11
  995. fExtraSeparator   EQU         12
  996. fEmptyFormatString EQU        13
  997.  
  998. WideChar          record      0,increment
  999. a                 ds.b        2                         ; PACKED ARRAY[0..1] OF CHAR
  1000.                   ORG         a
  1001. b                 ds.w        1                         ; INTEGER
  1002.                   endr
  1003.  
  1004. WideCharArr       record      0,increment
  1005. size              ds.w        1                         ; INTEGER
  1006. data              ds.w        10                        ; PACKED ARRAY[0..9] OF WideChar
  1007.                   endr
  1008.  
  1009. fVNumber          EQU         0                         ; first version of NumFormatString
  1010.  
  1011. NumFormatString   record      0,increment
  1012. fLength           ds.b        1                         ; length of format String
  1013. fVersion          ds.b        1                         ; version number
  1014. data            ds.b        254                        ; private data                                <33>
  1015.                   endr
  1016.  
  1017. ;Number format equates
  1018.  
  1019. tokLeftQuote      EQU         1
  1020. tokRightQuote     EQU         2
  1021. tokLeadPlacer     EQU         3
  1022. tokLeader         EQU         4
  1023. tokNonLeader      EQU         5
  1024. tokZeroLead       EQU         6
  1025. tokPercent        EQU         7
  1026. tokPlusSign       EQU         8
  1027. tokMinusSign      EQU         9
  1028. tokThousands      EQU         10
  1029. tokSeparator      EQU         12                        ; 11 is reserved
  1030. tokEscape         EQU         13
  1031. tokDecPoint       EQU         14
  1032. tokEPlus          EQU         15
  1033. tokEMinus         EQU         16
  1034. tokMaxSymbols     EQU         31
  1035.  
  1036. NumberParts       record      0,increment
  1037. version           ds.w        1                         ; integer
  1038. data              ds.w        tokMaxSymbols             ; ARRAY[tokLeftQuote..tokMaxSymbols] OF WideChar
  1039. pePlus            ds          WideCharArr               ; 64
  1040. peMinus           ds          WideCharArr               ; 86
  1041. peMinusPlus       ds          WideCharArr               ; 108
  1042. altNumTable       ds          WideCharArr               ; 130
  1043. reserved          ds.b        20
  1044. numberPartsSize   equ         *
  1045. curNumberPartsVersion equ     1
  1046.                   endr
  1047.  
  1048. TableDirectoryRecord     record      0,increment
  1049. tableSignature            ds.l        1                ; 4 byte long table name */
  1050. reserved                ds.l        1                ; Reserved for internal use */
  1051. tableStartOffset        ds.l        1                ; Table start offset in byte*/
  1052. tableSize                ds.l        1                ; Table size in byte*/
  1053.                           endr
  1054.  
  1055. Itl5Record                 record      0,increment
  1056. versionNumber            ds.l        1                        ; itl5 resource version number */
  1057. numberOfTables            ds.w        1                        ; Number of tables it contains */
  1058. reserved                ds.w        3                        ; Reserved for internal use */
  1059. tableDirectory            ds             TableDirectoryRecord    ; Table directory records */
  1060.                           endr
  1061.  
  1062. RuleBasedTrslRecord     record      0,increment
  1063. sourceType                ds.w        1                ; Transliterate target type for the LHS of the rule */
  1064. targetType                ds.w        1                ; Transliterate target type for the RHS of the rule */
  1065. formatNumber            ds.w        1                ; Transliterate resource format number */
  1066. propertyFlag            ds.w        1                ; Transliterate property flags */
  1067. numberOfRules            ds.w        1                ; Number of rules following this field */
  1068.                            endr
  1069.  
  1070.  
  1071.  
  1072. FVector           record      0,increment
  1073. start             ds.w        1                         ; INTEGER
  1074. length            ds.w        1                         ; INTEGER
  1075.                   endr
  1076.  
  1077. TripleInt         record      0,increment
  1078. zzz1              ds          FVector
  1079. zzz2              ds          FVector
  1080. zzz3              ds          FVector
  1081.                   endr
  1082.  
  1083. ; -----------------------------------------------------------------------------
  1084. ; Record for FindScriptRun result
  1085. ; -----------------------------------------------------------------------------
  1086.  
  1087. ScriptRunStatus   record      0,increment
  1088. script            ds.b        1
  1089. variant           ds.b        1
  1090.                   endr
  1091.  
  1092. ; -----------------------------------------------------------------------------
  1093. ; Selectors and macros for the Script Manager trap call, _ScriptUtil
  1094. ; -----------------------------------------------------------------------------
  1095.  
  1096.                   Macro
  1097.                   DefSMgrRoutine &name,&selector,&argSize,&returnSize
  1098.                   sm&name:    equ &selector**$FFFF
  1099.                   smSel&name: equ (1<<31)++(&returnSize<<24)++(&argSize<<16)++sm&name
  1100.                   endm
  1101.  
  1102. ; Trap routine selectors: script manager 1.0
  1103.  
  1104. smFontScript      EQU         0
  1105. smIntlScript      EQU         2
  1106. smKybdScript      EQU         4
  1107. smFont2Script     EQU         6
  1108. smGetEnvirons     EQU         8
  1109. smSetEnvirons     EQU         10
  1110. smGetScript       EQU         12
  1111. smSetScript       EQU         14
  1112. smHighCall        EQU         smSetScript               ; boundary between script mgr & script systems
  1113. smCharByte        EQU         16
  1114. smCharType        EQU         18
  1115. smPixel2Char      EQU         20
  1116. smChar2Pixel      EQU         22
  1117. smTranslit        EQU         24
  1118. smFindWord        EQU         26
  1119. smHiliteText      EQU         28
  1120. smDrawJust        EQU         30
  1121. smMeasureJust     EQU         32
  1122. smParseTable      EQU         34
  1123.  
  1124. ; Full Trap routine selectors: script manager 1.0
  1125.  
  1126. ; format                     newBit  return/args
  1127. smSelFontScript        EQU     (1<<31)++($0200<<16)++smFontScript
  1128. smSelIntlScript        EQU     (1<<31)++($0200<<16)++smIntlScript
  1129. smSelKybdScript        EQU     (1<<31)++($0002<<16)++smKybdScript
  1130. smSelFont2Script    EQU     (1<<31)++($0202<<16)++smFont2Script
  1131. smSelGetEnvirons    EQU     (1<<31)++($0402<<16)++smGetEnvirons
  1132. smSelSetEnvirons    EQU     (1<<31)++($0206<<16)++smSetEnvirons
  1133. smSelGetScript        EQU     (1<<31)++($0404<<16)++smGetScript
  1134. smSelSetScript        EQU     (1<<31)++($0208<<16)++smSetScript
  1135. smSelCharType        EQU     (1<<31)++($0206<<16)++smCharType
  1136. smSelCharByte        EQU     (1<<31)++($0206<<16)++smCharByte
  1137. smSelPixel2Char        EQU     (1<<31)++($020E<<16)++smPixel2Char
  1138. smSelChar2Pixel        EQU     (1<<31)++($020C<<16)++smChar2Pixel
  1139. smSelTranslit        EQU     (1<<31)++($020E<<16)++smTranslit
  1140. smSelFindWord        EQU     (1<<31)++($0012<<16)++smFindWord
  1141. smSelHiliteText        EQU     (1<<31)++($000E<<16)++smHiliteText
  1142. smSelDrawJust        EQU     (1<<31)++($0008<<16)++smDrawJust
  1143. smSelMeasureJust    EQU     (1<<31)++($000C<<16)++smMeasureJust
  1144. smSelParseTable        EQU     (1<<31)++($0204<<16)++smParseTable
  1145.  
  1146. ; selectors for general script manager 2.0 routines
  1147.  
  1148.         DefSmgrRoutine StyledLineBreak, -2,28,2
  1149.         DefSmgrRoutine GetFormatOrder, -4,18,0
  1150.         DefSmgrRoutine IntlTokenize, -6,4,2
  1151.  
  1152.         DefSmgrRoutine InitDateCache, -8,4,2
  1153.         DefSmgrRoutine String2Date, -10,20,2
  1154.         DefSmgrRoutine String2Time, -12,20,2
  1155.  
  1156.         DefSmgrRoutine LongDate2Secs, -14,8,0
  1157.         DefSmgrRoutine LongSecs2Date, -16,8,0
  1158.         DefSmgrRoutine ToggleDate, -18,14,2
  1159.  
  1160.         DefSmgrRoutine Str2Format, -20,12,2
  1161.         DefSmgrRoutine Format2Str, -22,16,2
  1162.         DefSmgrRoutine FormatX2Str, -24,16,2
  1163.         DefSmgrRoutine FormatStr2X, -26,16,2
  1164.         DefSmgrRoutine ValidDate, -28,12,2
  1165.  
  1166. ; selectors for script-specific script manager 2.0 routines
  1167.  
  1168.         DefSmgrRoutine PortionText, 36,8,4
  1169.         DefSmgrRoutine FindScriptRun, 38,12,2
  1170.         DefSmgrRoutine VisibleLength, 40,8,4
  1171.         DefSmgrRoutine IsSpecialFont, 42,2,2        ; implemented only by two-byte scripts
  1172.         DefSmgrRoutine RawPrinterValues, 44,22,2    ; implemented only by two-byte scripts
  1173.  
  1174. ; selectors for general script manager 7.0 routines                                        <2.1><2.4>
  1175.  
  1176.         DefSmgrRoutine    NFindWord,        -30,18,0    ; smSel… = $8012FFE2                <2.3>
  1177.         DefSmgrRoutine    TruncString,    -32,8,2        ; smSel… = $8208FFE0                <2.3><2.7><6>
  1178.         DefSmgrRoutine    TruncText,        -34,12,2    ; smSel… = $820CFFDE                <2.3><2.7><6>
  1179.         DefSmgrRoutine    ReplaceText,    -36,12,2    ; smSel… = $820CFFDC                <2.3>
  1180.  
  1181. ; selectors for script-specific script manager 7.0 routines                                <2>
  1182.  
  1183.         DefSmgrRoutine    NPixel2Char,    46,34,2        ;     $8222002E                        <2><17>
  1184.         DefSmgrRoutine    NChar2Pixel,    48,28,2        ;     $821C0030                        <2><17>
  1185.         DefSmgrRoutine    NDrawJust,        50,22,0        ;     $80160032                        <2><17>
  1186.         DefSmgrRoutine    NMeasureJust,    52,26,0        ;     $801A0034                        <2><17>
  1187.         DefSmgrRoutine    NPortionText,    54,18,4        ;     $84120036                        <2><17>
  1188.         
  1189. ; selectors for general script manager 7.1 routines                                        <2.1><2.4>
  1190.  
  1191.         DefSmgrRoutine    SCLwrString, -74,10,0        ; smSel… = $800AFFB6                <50>
  1192.  
  1193. ; function codes for SCLwrString                                                        <50>
  1194. sclwrDoLower        equ        $0000    ; where these bits go in _LowerText                    <50>
  1195. sclwrDoStrip        equ        $0200    ; where these bits go in _StripText                    <50>
  1196. sclwrDoUpper        equ        $0400    ; where these bits go in _UpperText                    <50>
  1197. sclwrDoStripUpper    equ        $0600    ; where these bits go in _StripUpperText            <50>
  1198.  
  1199. ; selectors for script-specific script manager 7.1 routines                                <43>
  1200.  
  1201.         DefSmgrRoutine    GetScriptRoutineAddr, 56,  4, 4    ; $84040038 implemented only by one-byte scripts
  1202.         DefSmgrRoutine    SetScriptRoutineAddr, 58,  8, 0    ; $8008003A implemented only by one-byte scripts
  1203.         DefSmgrRoutine    GetQDPatchAddr,          60,  6, 4    ; $8406003C implemented only by one-byte scripts
  1204.         DefSmgrRoutine    SetQDPatchAddr,          62, 10, 0    ; $800A003E implemented only by one-byte scripts
  1205.  
  1206. smSelSCGetScriptRoutineAddr    EQU        (1<<30)++smSelGetScriptRoutineAddr    ;                <43>
  1207. smSelSCSetScriptRoutineAddr    EQU        (1<<30)++smSelSetScriptRoutineAddr    ;                <43>
  1208. smSelSCGetQDPatchAddr        EQU        (1<<30)++smSelGetQDPatchAddr        ;                <43>
  1209. smSelSCSetQDPatchAddr        EQU        (1<<30)++smSelSetQDPatchAddr        ;                <43>
  1210.  
  1211. smSelSCCharByte                EQU        (1<<30)++smSelCharByte            ;                    <50>
  1212. smSelSCCharType                EQU        (1<<30)++smSelCharType            ;                    <50>
  1213. smSelSCTranslit                EQU        (1<<30)++smSelTranslit            ;                    <50>
  1214. smSelSCFindWord                EQU        (1<<30)++smSelFindWord            ;                    <50>
  1215. smSelSCParseTable            EQU        (1<<30)++smSelParseTable        ;                    <50>
  1216.  
  1217. ;------------------------------------------------------------------------------
  1218. ; Trap routine macros: Script Manager 1.0
  1219.  
  1220.                   macro
  1221.                   _FontScript
  1222.                   move.l      #smSelFontScript,-(sp)
  1223.                   _ScriptUtil
  1224.                   endm
  1225.  
  1226.                   macro
  1227.                   _IntlScript
  1228.                   move.l      #smSelIntlScript,-(sp)
  1229.                   _ScriptUtil
  1230.                   endm
  1231.  
  1232.                   macro
  1233.                   _KeyScript
  1234.                   move.l      #smSelKybdScript,-(sp)
  1235.                   _ScriptUtil
  1236.                   endm
  1237.  
  1238.                   macro
  1239.                   _Font2Script
  1240.                   move.l      #smSelFont2Script,-(sp)
  1241.                   _ScriptUtil
  1242.                   endm
  1243.  
  1244.                   macro
  1245.                   _GetEnvirons
  1246.                   move.l      #smSelGetEnvirons,-(sp)
  1247.                   _ScriptUtil
  1248.                   endm
  1249.  
  1250.                   macro
  1251.                   _SetEnvirons
  1252.                   move.l      #smSelSetEnvirons,-(sp)
  1253.                   _ScriptUtil
  1254.                   endm
  1255.  
  1256.                   macro
  1257.                   _GetScript
  1258.                   move.l      #smSelGetScript,-(sp)
  1259.                   _ScriptUtil
  1260.                   endm
  1261.  
  1262.                   macro
  1263.                   _SetScript
  1264.                   move.l      #smSelSetScript,-(sp)
  1265.                   _ScriptUtil
  1266.                   endm
  1267.  
  1268.                   macro
  1269.                   _CharByte
  1270.                   move.l      #smSelCharByte,-(sp)
  1271.                   _ScriptUtil
  1272.                   endm
  1273.  
  1274.                   macro
  1275.                   _CharType
  1276.                   move.l      #smSelCharType,-(sp)
  1277.                   _ScriptUtil
  1278.                   endm
  1279.  
  1280.                   macro
  1281.                   _Pixel2Char
  1282.                   move.l      #smSelPixel2Char,-(sp)
  1283.                   _ScriptUtil
  1284.                   endm
  1285.  
  1286.                   macro
  1287.                   _Char2Pixel
  1288.                   move.l      #smSelChar2Pixel,-(sp)
  1289.                   _ScriptUtil
  1290.                   endm
  1291.  
  1292.                   macro
  1293.                   _Transliterate
  1294.                   move.l      #smSelTranslit,-(sp)
  1295.                   _ScriptUtil
  1296.                   endm
  1297.  
  1298.                   macro
  1299.                   _FindWord
  1300.                   move.l      #smSelFindWord,-(sp)
  1301.                   _ScriptUtil
  1302.                   endm
  1303.  
  1304.                   macro
  1305.                   _HiliteText
  1306.                   move.l      #smSelHiliteText,-(sp)
  1307.                   _ScriptUtil
  1308.                   endm
  1309.  
  1310.                   macro
  1311.                   _DrawJust
  1312.                   move.l      #smSelDrawJust,-(sp)
  1313.                   _ScriptUtil
  1314.                   endm
  1315.  
  1316.                   macro
  1317.                   _MeasureJust
  1318.                   move.l      #smSelMeasureJust,-(sp)
  1319.                   _ScriptUtil
  1320.                   endm
  1321.  
  1322.                   macro
  1323.                   _ParseTable
  1324.                   move.l      #smSelParseTable,-(sp)
  1325.                   _ScriptUtil
  1326.                   endm
  1327.  
  1328. ;------------------------------------------------------------------------------
  1329. ; Trap routine macros: Script Manager 2.0
  1330.  
  1331.                   macro
  1332.                   _GetFormatOrder
  1333.                   move.l      #smSelGetFormatOrder,-(sp)
  1334.                   _ScriptUtil
  1335.                   endm
  1336.  
  1337.                   macro
  1338.                   _StyledLineBreak
  1339.                   move.l      #smSelStyledLineBreak,-(sp)
  1340.                   _ScriptUtil
  1341.                   endm
  1342.  
  1343.                   macro
  1344.                   _IntlTokenize
  1345.                   move.l      #smSelIntlTokenize,-(sp)
  1346.                   _ScriptUtil
  1347.                   endm
  1348.  
  1349.                   macro
  1350.                   _InitDateCache
  1351.                   move.l      #smSelInitDateCache,-(sp)
  1352.                   _ScriptUtil
  1353.                   endm
  1354.  
  1355.                   macro
  1356.                   _String2Date
  1357.                   move.l      #smSelString2Date,-(sp)
  1358.                   _ScriptUtil
  1359.                   endm
  1360.  
  1361.                   macro
  1362.                   _String2Time
  1363.                   move.l      #smSelString2Time,-(sp)
  1364.                   _ScriptUtil
  1365.                   endm
  1366.  
  1367.                   macro
  1368.                   _LongSecs2Date
  1369.                   move.l      #smSelLongSecs2Date,-(sp)
  1370.                   _ScriptUtil
  1371.                   endm
  1372.  
  1373.                   macro
  1374.                   _LongDate2Secs
  1375.                   move.l      #smSelLongDate2Secs,-(sp)
  1376.                   _ScriptUtil
  1377.                   endm
  1378.  
  1379.                   macro
  1380.                   _Str2Format
  1381.                   move.l      #smSelStr2Format,-(sp)
  1382.                   _ScriptUtil
  1383.                   endm
  1384.  
  1385.                   macro
  1386.                   _Format2Str
  1387.                   move.l      #smSelFormat2Str,-(sp)
  1388.                   _ScriptUtil
  1389.                   endm
  1390.  
  1391.                   macro
  1392.                   _FormatX2Str
  1393.                   move.l      #smSelFormatX2Str,-(sp)
  1394.                   _ScriptUtil
  1395.                   endm
  1396.  
  1397.                   macro
  1398.                   _FormatStr2X
  1399.                   move.l      #smSelFormatStr2X,-(sp)
  1400.                   _ScriptUtil
  1401.                   endm
  1402.  
  1403.                   macro
  1404.                   _ValidDate
  1405.                   move.l      #smSelValidDate,-(sp)
  1406.                   _ScriptUtil
  1407.                   endm
  1408.  
  1409.                   macro
  1410.                   _ToggleDate
  1411.                   move.l      #smSelToggleDate,-(sp)
  1412.                   _ScriptUtil
  1413.                   endm
  1414.  
  1415.                   macro
  1416.                   _PortionText
  1417.                   move.l      #smSelPortionText,-(sp)
  1418.                   _ScriptUtil
  1419.                   endm
  1420.  
  1421.                   macro
  1422.                   _FindScriptRun
  1423.                   move.l      #smSelFindScriptRun,-(sp)
  1424.                   _ScriptUtil
  1425.                   endm
  1426.  
  1427.                   macro
  1428.                   _ReadLocation
  1429.                   movea.l     (sp)+,A0
  1430.                   move.l      #$000C00E4,D0
  1431.                   _ReadXPRam
  1432.                   endm
  1433.  
  1434.                   macro
  1435.                   _WriteLocation
  1436.                   movea.l     (sp)+,A0
  1437.                   move.l      #$000C00E4,D0
  1438.                   _WriteXPRam
  1439.                   endm
  1440.  
  1441.                   macro
  1442.                   _VisibleLength
  1443.                   move.l      #smSelVisibleLength,-(sp)
  1444.                   _ScriptUtil
  1445.                   endm
  1446.  
  1447.                   macro
  1448.                   _IsSpecialFont
  1449.                   move.l      #smSelIsSpecialFont,-(sp)
  1450.                   _ScriptUtil
  1451.                   endm
  1452.  
  1453.                   macro
  1454.                   _RawPrinterValues
  1455.                   move.l      #smSelRawPrinterValues,-(sp)
  1456.                   _ScriptUtil
  1457.                   endm
  1458.  
  1459.  
  1460. ;------------------------------------------------------------------------------
  1461. ; Trap routine macros: Script Manager 7.0                    <2.1>
  1462.  
  1463.                 macro
  1464.                 _NFindWord                                    ; <2.3>
  1465.                 move.l      #smSelNFindWord,-(sp)
  1466.                 _ScriptUtil
  1467.                 endm
  1468.         
  1469.                 macro
  1470.                 _TruncString                                ; <2.3>
  1471.                 move.l      #smSelTruncString,-(sp)
  1472.                 _ScriptUtil
  1473.                 endm
  1474.         
  1475.                 macro
  1476.                 _TruncText                                    ; <2.3>
  1477.                 move.l      #smSelTruncText,-(sp)
  1478.                 _ScriptUtil
  1479.                 endm
  1480.         
  1481.                 macro
  1482.                 _ReplaceText                                ; <2.3>
  1483.                 move.l      #smSelReplaceText,-(sp)
  1484.                 _ScriptUtil
  1485.                 endm
  1486.         
  1487.                 macro
  1488.                 _NPixel2Char                                ;    <2>
  1489.                 move.l      #smSelNPixel2Char,-(sp)
  1490.                 _ScriptUtil
  1491.                 endm
  1492.         
  1493.                 macro
  1494.                 _NChar2Pixel                                ;    <2>
  1495.                 move.l      #smSelNChar2Pixel,-(sp)
  1496.                 _ScriptUtil
  1497.                 endm
  1498.         
  1499.                 macro
  1500.                 _NDrawJust                                    ;    <2>
  1501.                 move.l      #smSelNDrawJust,-(sp)
  1502.                 _ScriptUtil
  1503.                 endm
  1504.         
  1505.                 macro
  1506.                 _NMeasureJust                                ;    <2>
  1507.                 move.l      #smSelNMeasureJust,-(sp)
  1508.                 _ScriptUtil
  1509.                 endm
  1510.         
  1511.                 macro
  1512.                 _NPortionText                                ;    <2>
  1513.                   move.l      #smSelNPortionText,-(sp)
  1514.                   _ScriptUtil
  1515.                   endm
  1516.  
  1517. ;------------------------------------------------------------------------------
  1518. ; Trap routine macros: Script Manager 7.1                                        <43>
  1519.  
  1520.                 macro
  1521.                 _SCGetScriptRoutineAddr                            ;                <43>
  1522.                   move.l      #smSelSCGetScriptRoutineAddr,-(sp)
  1523.                   _ScriptUtil
  1524.                   endm
  1525.  
  1526.                 macro
  1527.                 _SCSetScriptRoutineAddr                            ;                <43>
  1528.                   move.l      #smSelSCSetScriptRoutineAddr,-(sp)
  1529.                   _ScriptUtil
  1530.                   endm
  1531.  
  1532.                 macro
  1533.                 _SCGetQDPatchAddr                                ;                <43>
  1534.                   move.l      #smSelSCGetQDPatchAddr,-(sp)
  1535.                   _ScriptUtil
  1536.                   endm
  1537.  
  1538.                 macro
  1539.                 _SCSetQDPatchAddr                                ;                <43>
  1540.                   move.l      #smSelSCSetQDPatchAddr,-(sp)
  1541.                   _ScriptUtil
  1542.                   endm
  1543.  
  1544.                 macro
  1545.                 _SCLowerText                                ;                    <50>
  1546.                 move.w        #sclwrDoLower,-(sp)
  1547.                 move.l      #smSelSCLwrString,-(sp)
  1548.                 _ScriptUtil
  1549.                 endm
  1550.         
  1551.                 macro
  1552.                 _SCStripText                                ;                    <50>
  1553.                 move.w        #sclwrDoStrip,-(sp)
  1554.                 move.l      #smSelSCLwrString,-(sp)
  1555.                 _ScriptUtil
  1556.                 endm
  1557.         
  1558.                 macro
  1559.                 _SCUpperText                                ;                    <50>
  1560.                 move.w        #sclwrDoUpper,-(sp)
  1561.                 move.l      #smSelSCLwrString,-(sp)
  1562.                 _ScriptUtil
  1563.                 endm
  1564.         
  1565.                 macro
  1566.                 _SCStripUpperText                            ;                    <50>
  1567.                 move.w        #sclwrDoStripUpper,-(sp)
  1568.                 move.l      #smSelSCLwrString,-(sp)
  1569.                 _ScriptUtil
  1570.                 endm
  1571.  
  1572.                   macro
  1573.                   _SCCharByte                                    ;                    <50>
  1574.                   move.l      #smSelSCCharByte,-(sp)
  1575.                   _ScriptUtil
  1576.                   endm
  1577.  
  1578.                   macro
  1579.                   _SCCharType                                    ;                    <50>
  1580.                   move.l      #smSelSCCharType,-(sp)
  1581.                   _ScriptUtil
  1582.                   endm
  1583.  
  1584.                   macro
  1585.                   _SCTransliterate                            ;                    <50>
  1586.                   move.l      #smSelSCTranslit,-(sp)
  1587.                   _ScriptUtil
  1588.                   endm
  1589.  
  1590.                   macro
  1591.                   _SCFindWord                                    ;                    <50>
  1592.                   move.l      #smSelSCFindWord,-(sp)
  1593.                   _ScriptUtil
  1594.                   endm
  1595.  
  1596.                   macro
  1597.                   _SCParseTable                                ;                    <50>
  1598.                   move.l      #smSelSCParseTable,-(sp)
  1599.                   _ScriptUtil
  1600.                   endm
  1601.  
  1602.     ENDIF    ; ...already included